// 类型检查
// 引入插件prop-types
// npm install prop-types --save


import React from "react";

import PropTypes from "prop-types";

class PropChild extends React.Component {
    render() {
        return (
            <div>
                {this.props.msg}
            </div>
        )
   }
}
PropChild.propTypes={
    msg:PropTypes.string.isRequired
}
// 默认值
PropChild.defaultProps={
    msg:"我是默认值"
}
export default PropChild;